package demo.springboot.service;

import demo.springboot.POJO.T_product;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * demo.springboot.POJO.T_news 业务接口层
 */
@org.apache.ibatis.annotations.Mapper
public interface T_productService {
//    List<News> findAll();
//    News insertByNews(News news);
//    News update(News news);
//    News delete(Long id);
//    News findById(Long id);

    @Select("   SELECT   id,title,img_url,type     FROM `t_product`   limit 1,11     ")
    List<T_product> findAll();


    @Select("   SELECT   id,title,img_url,type     FROM `t_product`   where `type` = #{type}    ")
    List<T_product> findByType(String type);


    @Select("SELECT * FROM   `t_product`   WHERE   id   =   #{id}")
    T_product findById(Integer id);


}
